package com.itheima.file;

import java.io.File;

/*
三个获取方法
getName
getPath
getAbsolutePath()
 */
public class Demo06 {

    public static void main(String[] args) {

        File file = new File("day12","abc.txt");
        System.out.println(file.getName());//既包含名称  也包含后缀
        System.out.println(file.getPath());//获取路径
        System.out.println(file.getAbsolutePath());//获取绝对路径

        File file1 = new File("d:\\zhaichaojie\\abc","abc");
        System.out.println(file1.getName());//既包含名称  也包含后缀
        System.out.println(file1.getPath());//获取路径
        System.out.println(file1.getAbsolutePath());//获取绝对路径


    }
}
